package classfile

type SourceFileAttr struct {
	AttrStruct
	sourceFileIndex uint16
	sourceFile      Constant_Utf8
}

func (self *SourceFileAttr) readAttrInfo(cp ConstantPool) AttributeInfo {
	self.sourceFileIndex = self.attributeData.ReadUInt16()
	self.sourceFile = *cp.GetConstant(self.sourceFileIndex).(*Constant_Utf8)
	return self
}

func (self *SourceFileAttr) GetSourceFile() string {
	//return self.sourceFile
	return self.sourceFile.Value
}
